﻿/*
 * Erstellt mit SharpDevelop.
 * Benutzer: Kai Patrick
 * Datum: 27.03.2008
 * Zeit: 18:56
 * 
 * Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern.
 */

using System;
using System.Collections.Generic;
using Irony.Compiler;

namespace Gamadus.Builder
{
	/// <summary>
	/// Description of CompilerResults.
	/// </summary>
	public class ParserResults
	{
		public int LineCount;
		public int TokenCount;
		public long CompileTime;
		public AstNode RootNode;
		public List<SyntaxError> Errors;
		
		public ParserResults(LanguageCompiler compiler, AstNode rootNode)
		{
			LineCount = compiler.Parser.LineCount;
			TokenCount = compiler.Parser.TokenCount;
			CompileTime = compiler.CompileTime;
			Errors = new List<SyntaxError>(compiler.Context.Errors);
			RootNode = GenerateNode(rootNode);
		}
		
		AstNode GenerateNode(AstNode node)
		{
			//TODO: has to make a GmlNode
			return node;
		}
	}
}
